<html>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> 
<head>
<script>
function OuvrirPopup(page) {
      window.open(page, "comments", "toolbar=no, status=yes, scrollbars=yes, resizable=yes, width=1230, height=600");
}
</script>
<script src="../../../../global-themis/js/jquery.js"></script>
<script src="../../../../global-themis/js/jquery.tablescroll.js"></script>
<link rel='stylesheet' type='text/css' href='../../../../global-themis/css/themisstyle.css'/>				
		<script>
			$(document).ready(function(){
				$('#sign_cli').tableScroll('undo'); // le scrollbar
			});

		</script>
<?php

include ("../../../../PCO.php");
include ("../../../../global-themis/functions/functions.php");
include ("../../../../global-themis/Classes/client.class");
$num_cli="";
$content="";
$sign_cli="";
$sign_requis="";
$cot_client="";
$sign_admin="";
$cli=array();
$admin=array();
if(isset($_GET['num_cli'])){
	$num_cli=$_GET['num_cli'];
	if(strlen($num_cli)==6)
	$num_cli="0".$num_cli."";
	$client= new Client();
	$client->setNum($num_cli);
	$cli=$client->getAllByNum($num_cli); // recuperer les infos du client.
	$cot_client = $cli['CLIENACOT'];  // la situation
	$sign_cli = $client->getSignature($num_cli); // recuperer la signature du client (un fichier PDF).
	$sign_requis=signRequises($cot_client, $num_cli); //les signatures requises
	$admin=$client->getAdminClient($num_cli); // l'admin du client.
	$sign_admin=getAdminSign($admin['CLIICONUM']); //recuperer la signature du Admin (un fichier PDF).
	if(trim($sign_admin)=="")	$sign_admin="-"; 
	if(trim($cot_client)=="")	$cot_client="-"; 
	// construction du tableau
	$content.="<table id='sign_cli' class='tablescroll' width='100%'> 
				<thead>
				<tr><td>Titre<td>Valeur</td></tr></thead>
				<tbody>
				<tr><td>Situation</td><td>$cot_client</td></tr>
				<tr><td>Signature(s) </td><td>$sign_cli</td></tr>
			    <tr><td>Sign. requises </td><td>$sign_requis</td></tr>
			    <tr><td>Administrateur</td><td>".$admin['CLIICONUM']." ".$admin['CLIENARA1']."</td></tr>
			    <tr><td>Signature(s)</td><td>$sign_admin</td></tr>
			    <tr><td colspan='2'>&nbsp;</td></tr>
			    <tr><td colspan='2'>&nbsp;</td></tr>
			    <tr><td colspan='2'>&nbsp;</td></tr>
				</tbody>
			  </table>";
}
?>

</head>
<body>
<div id='container'>
	<?php
		echo $content;
	?>
</div>
</body>
</html>